package com.sch.sudoku;

import android.app.*;
import android.os.*;
import android.view.Menu;
import android.widget.LinearLayout;
import android.content.Intent;
import android.widget.Button;
import android.view.WindowManager;
import android.view.View;

public class MainActivity extends Activity 
{
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
		getWindow().setStatusBarColor(0xFF3F51B5);
		getWindow().setTitleColor(0xff24cf5f);
		//this.getActionBar().setCustomView(R.layout.actionbar);
		//getActionBar().setCustomView(R.layout.actionbar);
		//getActionBar().setDisplayShowTitleEnabled(false);
		Button a = (Button)findViewById(R.id.mainButton1);
		a.setText("Go to game.class to test this Application.");
		a.setWidth(((WindowManager)getSystemService(WINDOW_SERVICE)).getDefaultDisplay().getWidth());
		a.setOnClickListener(new Button.OnClickListener(){

				@Override
				public void onClick(View p1)
				{
					// TODO: Implement this method
					goto_game_class();
				}
			});
		
    }

	@Override
	public boolean onCreateOptionsMenu(Menu menu)
	{
		menu.add(0,0,0,"关于");
		menu.add(0,0,1,"退出");
		return true;
	}
	public void goto_game_class()
	{
		Intent intent = new Intent();
		intent.setClass(this,game.class);
		startActivity(intent);
	}
}
